import React, { PureComponent } from 'react'
import { HashRouter, Link, Routes, Route } from 'react-router-dom'
import Home from './home'
import About from './about'



export default class HashRouterC extends PureComponent {
  render() {
    return (
      <div>
        {/* HashRouter 外层包裹 */}
        <HashRouter>
          <Link to="/">首页</Link>
          <Link to="/about">关于</Link>

          <Routes>
            <Route path='/' element={<Home />}></Route>
            <Route path='/about' element={<About />}></Route>
          </Routes>
        </HashRouter>
      </div>
    )
  }
}
